/*
 * Copyright (c) 2017年11月10日  by XuanWu Wireless Technology Co., Ltd 
 *             All rights reserved  
 */
package com.zml.twelfth.example.factory;

import com.zml.twelfth.example.QuackCounter;
import com.zml.twelfth.example.duck.DuckCall;
import com.zml.twelfth.example.duck.MallarDuck;
import com.zml.twelfth.example.duck.Quackable;
import com.zml.twelfth.example.duck.RedheadDuck;
import com.zml.twelfth.example.duck.RubberDuck;

/**
 * @author <a href="mailto:zhaominglin@wxchina.com">minglin.Zhao</a>
 * @Description 创建装饰者的鸭子
 * @Date 2017/11/10
 * @Version 1.0.0
 */
public class CountingDuckFactory extends AbstractDuckFactory{
    @Override
    public Quackable createMallardDuck() {
        return new QuackCounter(new MallarDuck());
    }

    @Override
    public Quackable createRedheadDuck() {
        return new QuackCounter(new RedheadDuck());
    }

    @Override
    public Quackable createDuckCall() {
        return new QuackCounter(new DuckCall());
    }

    @Override
    public Quackable createRubberDuck() {
        return new QuackCounter(new RubberDuck());
    }
}
